/**
 * 
 */
package com.thor.palmmall.rest.chart.converter;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.chart.AMaintainDetial;
import com.thor.palmmall.spi.chart.SMaintainDetial;

/**
 * @author NuoSa
 *
 * @since 1.0
 */
public class AMaintainDetialConverter implements Converter<SMaintainDetial, AMaintainDetial> {

  public static AMaintainDetialConverter getInstance() {
    if (instance == null)
      instance = new AMaintainDetialConverter();
    return instance;
  }

  private static AMaintainDetialConverter instance;

  private AMaintainDetialConverter() {
  }

  @Override
  public AMaintainDetial convert(SMaintainDetial source) {
    if (source == null) {
      return null;
    }
    AMaintainDetial target = new AMaintainDetial();
    target.setBizState(source.getBizState());
    target.setInnerQty(source.getInnerQty());
    target.setQty(source.getQty());
    target.setTenantQty(source.getTenantQty());
    return target;
  }

}
